package com.ztgf.order.models.service.pay;

import com.baomidou.mybatisplus.plugins.Page;
import com.ztgf.common.constant.Result;
import com.ztgf.order.models.bo.pay.PayOrderLogBO;
import com.ztgf.order.models.bo.pay.PayOrderLogSaveBO;
import com.ztgf.order.models.bo.pay.PayOrderSaveBO;
import com.ztgf.order.models.dto.pay.PayOrderLogDTO;
import com.ztgf.order.models.vo.pay.PayOrderLogVO;
import com.ztgf.order.models.vo.pay.PayOrderMoneyVO;
import com.ztgf.order.models.vo.pay.PayOrderVO;
import com.ztgf.pay.models.dto.PayOrderDTO;
import com.ztgf.pay.models.dto.PayUserRechargeDTO;

import java.math.BigDecimal;

public interface IPayService {

    Result<PayOrderMoneyVO> getPayMoney(String ids, Integer type, boolean isCheckToken);
    /**
     * 支付
     * @param bo
     * @param isCheckToken 是否效验token
     * @return
     */
    Result<PayOrderVO> savePay(PayOrderSaveBO bo, boolean isCheckToken);

    /**
     * 合同签署完成修改订单状态
     * @param orderId
     * @return
     */
    Result saveSellContactSuccess(Long orderId);

    /**
     * 解冻保证金
     * @param shopId
     * @param money
     * @return
     */
    Result saveUnfreezeMarginMoney(Long shopId, BigDecimal money, String notes);

    /**
     * 查看保证金使用记录和退还保证金记录
     * @param bo
     * @return
     */
    Page<PayOrderLogVO> queryPagePayOrderLog(PayOrderLogBO bo);

    /**
     * 扣除保证金总和
     * @param shopId
     * @param type
     * @return
     */
    BigDecimal querySumDeductMarginMoney(Long shopId, int type);


    /**
     * 订单支付
     * @param orderDTO
     * @param logDTO
     */
    void saveOrderPaySuccess(PayOrderDTO orderDTO, PayOrderLogDTO logDTO);

}
